package weekend02;

import java.io.File;
import java.io.IOException;

public class CreatNewFileDemo {
    public static void main(String[] args) throws IOException {
        for (int i = 1; i <= 10 ; i++) {
            File file =new File("demo"+i+".txt");
            if (!file.exists()){
                file.createNewFile();
            }else {
                System.out.println("文件demo"+i+".txt已存在");
            }
        }
        System.out.println("创建完成");
    }
}
